<div class="page_title">
    <h2 class="fl">{$pageTitle}</h2>
</div>
{include file="public/public_search" /}
<section class="clearfix stream_list">
    {notempty name="list.data"}
    {volist name="list.data" id="vo"}
    <div class="stream_item">
        <div>
            <ul>
                <li>
                    <div class="stream_uname_title ellipsis"style="width: 180px; max-width: 160px;">{$vo.video.video_title}</div>
                </li>
                <li>
                    <div class="stream_bg">
                        <div class="no_stream_snapshot">
                            <img src="{$vo.video.video_icon[0]}?imageMogr2/thumbnail/180x320"/>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="stream_hover" style="height: 88%;width: 95%">
                        <div class="stream_info">{eq name="vo.video.status_code" value="0"}
                            <a target="_blank"  href="{$vo.video.video_playurl}" class="inner_btn show">
                                <i class="iconfont iconfont-chakan watch_vbtn" style="color: white">观看视频</i>
                            </a>
                            {/eq}
                            <a class="delvideo loadContent" data-id="{$vo.video.vid}" href="javascript:void(0)">
                                <i class="iconfont iconfont-shanchu watch_vbtn" style="color: white">删除</i>
                            </a>
                        </div>
                     </div>
                </li>
                <li style="margin-top: 10px">
                    <span class="item_name ellipsis" style="width:180px;display:block">视频长度：{$vo.video.time_info}</span>
                </li>
            </ul>
        </div>
    </div>
    {/volist}
    {else /}
    <div class="not-data">暂时没有回放视频</div>
    {/notempty}
</section>
<aside class="paging">
    {$list.html}
</aside>
<script>
    $(".stream_item").bind({
        mouseleave:function(){
            //鼠标离开
            $(this).find(".stream_uname_title,.stream_view_count,.stream_title").slideDown();
            $(this).find(".stream_hover").stop('slideDown').slideUp();
        },
        mouseenter:function(){
            $(this).find(".stream_uname_title,.stream_view_count,.stream_title").slideUp();
            $(this).find(".stream_hover").stop('slideUp').slideDown();
        }
    });
</script>
<script type="text/javascript">

    $(".delvideo").click(function(){
        var id = $(this).data('id');
        msg({
            yes:'删除',
            no:'取消',
            txt:'确认删除?',
        },'question').then(function() {
            var send_data = {
                url:U('admin/Video/delVideo'),
                type:'POST',
                data:{
                    id:id
                },
                dataType:'json',
            };
            send_ajax(send_data,function(response){
                if(response === false){
                    DEBUG && admin.log(ajax_error);
                    return false;
                }
                if(response.status == 1){
                    msg_success(response.data.info,'',1000);
                    setTimeout(function(){
                        admin.getContentByUrl(admin.lastGetUrl);
                    },1000);
                }else{
                    msg_error(response.message);
                }
                admin.log(response);
            });
        }, function(miss) {
            //dismiss can be 'cancel', 'overlay', 'close', 'timer'
            //if (miss === 'cancel') {
            //msg('你取消了')
            //}
        });
    });
</script>